<%@page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@include file="/includes/taglibs.jsp"%>
<%@page import="com.feib.soeasy.util.UserUtil"%>
<%@page import="java.util.Map"%>
<%@page import="com.feib.soeasy.util.CodeTableUtil"%>
<%@page import="com.feib.soeasy.action.Soez5001ActionBean"%>	

<c:choose>
	<c:when test="${null != actionBean.resultByGroup }">

<div id="feedbackLogViewDiv">
	<table id="listTable">
		<thead>
			<tr>
				<th>No.</th>
				<th>業者代號</th>			
				<th>入帳帳號</th>
				<th>業者名稱</th>
				<th>代收筆數</th>
				<th>代收金額</th>
				<th>實收金額</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${actionBean.resultByGroup}" var="viewObj" varStatus="rowstat">
			<tr>
				<td align="center">${rowstat.index+1 }</td>
				<td align="center"><c:out value="${viewObj.group.groupNo}" /></td>
				<td align="center"><c:out value="${viewObj.realAccount.accountNo}" /></td>	
				<td align="left"><c:out value="${viewObj.group.groupName}" /></td>				
				<td align="right">
					<fmt:formatNumber value="${viewObj.payedCount}" pattern="##,###" />
				</td>	
				<td align="right">
					<fmt:formatNumber value="${viewObj.payedTotalAmount}" pattern="##,###" />
				</td>	
				<td align="right">
					<fmt:formatNumber value="${viewObj.payedTotalRealPayAmount}" pattern="##,###" />
				</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<div id="paginationBar">
			<input type="button" id="doDownloadGroupExcelFile" name="doDownloadGroupExcelFile"  value="下載(Excel)"
			onclick="javascript:doDownloadGroupExcelFileAction();"  />
			<input type="button" id="printBtn2" value="列印" onclick="javascript:divPrint('queryResultDiv');" />
		</div>
		
<script type="text/javascript">	
	<!--
	$(document).ready(function() {
		$("[id^='doDownloadGroupExcelFile']").click(function() {
			doDownloadGroupExcelFile();
		});
	});
	//-->
</script>

<div id="cancelPaymentMsgDiv" style="display: none; ">
</div>
		

	</c:when>
	<c:otherwise>
		<div id="queryNothingBlockDiv" style="display: none;">
			查無資料
		</div>	
		<script type="text/javascript">
		<!--
		$(document).ready(function() {
			$( "#paymentsItemDiv" ).dialog( "destroy" );
			$( "#paymentsItemDiv" ).dialog({  title:'超商通路統計查詢' ,width: 600, resizable: false, modal: true  });
		});
		//-->
		</script>
	</c:otherwise>
</c:choose>